Type.registerNamespace("BM");BM.CustomConstraint=function(a,b){BM.CustomConstraint.initializeBase(this,[a,b])};BM.CustomConstraint.prototype={getFunctionName:function(){return this.getProperty("name")},validatesAgainstFunction:function(){if(this.getFunctionName()==null){return true}try{var func=eval(this.getFunctionName());return func(this.getValue(),this.item.getId())}catch(e){alert("Invalid function:"+this.getFunctionName());return true}},isMet:function(){return this.validatesAgainstFunction()},getDefaultErrorText:function(){return BM.Messages.CustomConstraintError+" "+this.getFunctionName()}};BM.CustomConstraint.registerClass("BM.CustomConstraint",BM.Constraint);